<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
<th:block data-th-replace="/adminlte/base::base-head"></th:block>
</head>
<body class="hold-transition sidebar-mini layout-fixed">
<div class="wrapper">
<th:block data-th-replace="/adminlte/base::base-navbar"></th:block>
<th:block data-th-replace="/adminlte/base::base-main-sidebar"></th:block>
<div class="content-wrapper">
	<th:block data-th-replace="/adminlte/base::base-content-header"></th:block>
	<section class="content">
		<div class="container-fluid">
	      <div class="card">
	            <div class="card-header">
	            	<div class="row mt-2">
		              <div class="w-100"></div>
		              <div class="input-group mx-2 mb-2">
		                  <div class="input-group-prepend">
								<button type="submit" class="btn btn-default" data-get-username="#search-user" onclick="changeThis(this)">
								<i class="fas fa-search"></i>
								</button>
							</div>
							<input id="search-user" type="text" name="table_search" class="form-control" placeholder="Search" 
							  autofocus="autofocus" data-get-search="#search-user" onkeyup="enterThis(this, changeThis)">
		              </div>
	            	</div>
	            </div>
	            <div class="card-body">
	            	<div class="table-responsive">
		              <table id="currency-user-table" class="table table-bordered table-hover table-striped" data-url="/currencys/users">
		              	<colgroup>
		              		<col width="200"/>
		              	</colgroup>
		                <thead>
			                <tr>
								<th>用户名</th>
								<th data-th-each="currency: ${currencyList}" th:text="${currency.name}">用户角色</th>
			                </tr>
		                </thead>
		                <tbody>
		                	<tr data-th-each="user: ${userPage.data}">
								<td data-th-utext="${user.nickname}">权限名称</td>
								<td data-th-each="currency: ${currencyList}" 
								    th:data-obj-user_id="${user.id}" 
								    th:data-obj-currency_id="${currency.id}"
								    data-col-name="amount"
								    contenteditable="true" 
									th:utext="${currencyUtils.getAmount(user.id, currency.id)}">用户角色</td>
		                	</tr>
		                </tbody>
		              </table>
	            	</div>
	            	<th:block data-th-replace="/adminlte/base::pageNav(${userPage},'个用户')"></th:block>
	            </div>
	     	</div>
		</div>
	</section>
</div>
<th:block data-th-replace="/adminlte/base::base-footer"></th:block>
<th:block data-th-replace="/adminlte/base::base-control-sidebar"></th:block>
</div>
<script src="/kaibes/js/table-update.js"></script>
</body>
</html>